<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>std.math</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "std.math";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/std.math.html" class="symbol">std.math</a></h1>
  
<dl>
<dt class="decl">template <a class="symbol _template" name="floatTraits" href="./htmlsrc/std.math.html#L98" kind="template" beg="98" end="161">floatTraits</a><span class="tparams">(T)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#floatTraits" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L98">#</a></dt>
<dd class="ddef">
<dl>
<dt class="decl">ushort <a class="symbol _variable" name="floatTraits.EXPMASK" href="./htmlsrc/std.math.html#L105" kind="variable" beg="105" end="105">EXPMASK</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#floatTraits.EXPMASK" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L105">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">ushort <a class="symbol _variable" name="floatTraits.EXPBIAS" href="./htmlsrc/std.math.html#L106" kind="variable" beg="106" end="106">EXPBIAS</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#floatTraits.EXPBIAS" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L106">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">uint <a class="symbol _variable" name="floatTraits.EXPMASK_INT" href="./htmlsrc/std.math.html#L107" kind="variable" beg="107" end="107">EXPMASK_INT</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#floatTraits.EXPMASK_INT" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L107">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">uint <a class="symbol _variable" name="floatTraits.MANTISSAMASK_INT" href="./htmlsrc/std.math.html#L108" kind="variable" beg="108" end="108">MANTISSAMASK_INT</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#floatTraits.MANTISSAMASK_INT" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L108">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _variable" name="floatTraits.POW2MANTDIG" href="./htmlsrc/std.math.html#L109" kind="variable" beg="109" end="109">POW2MANTDIG</a>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#floatTraits.POW2MANTDIG" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L109">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">auto <a class="symbol _variable" name="MANTISSA_LSB" href="./htmlsrc/std.math.html#L165" kind="variable" beg="165" end="165">MANTISSA_LSB</a>; <span class="attrs">[<span class="prot">private</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#MANTISSA_LSB" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L165">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">auto <a class="symbol _variable" name="MANTISSA_MSB" href="./htmlsrc/std.math.html#L166" kind="variable" beg="166" end="166">MANTISSA_MSB</a>; <span class="attrs">[<span class="prot">private</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#MANTISSA_MSB" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L166">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">class <a class="symbol _class" name="NotImplemented" href="./htmlsrc/std.math.html#L173" kind="class" beg="173" end="179">NotImplemented</a> : Error; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#NotImplemented" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L173">#</a></dt>
<dd class="ddef">
<dl>
<dt class="decl"><a class="symbol _ctor" name="NotImplemented.this" href="./htmlsrc/std.math.html#L175" kind="ctor" beg="175" end="178">this</a><span class="params">(string <em>msg</em>)</span>; <a title="Permalink to this symbol" href="#NotImplemented.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L175">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">real <a class="symbol _variable" name="E" href="./htmlsrc/std.math.html#L181" kind="variable" beg="181" end="181">E</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#E" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L181">#</a></dt>
<dd class="ddef">
<div class="summary">e</div></dd>
<dt class="decl">real <a class="symbol _variable" name="LOG2T" href="./htmlsrc/std.math.html#L183" kind="variable" beg="183" end="183">LOG2T</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#LOG2T" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L183">#</a></dt>
<dd class="ddef">
<div class="summary">log<sub>2</sub>10</div></dd>
<dt class="decl">real <a class="symbol _variable" name="LOG2E" href="./htmlsrc/std.math.html#L185" kind="variable" beg="185" end="185">LOG2E</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#LOG2E" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L185">#</a></dt>
<dd class="ddef">
<div class="summary">log<sub>2</sub>e</div></dd>
<dt class="decl">real <a class="symbol _variable" name="LOG2" href="./htmlsrc/std.math.html#L187" kind="variable" beg="187" end="187">LOG2</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#LOG2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L187">#</a></dt>
<dd class="ddef">
<div class="summary">log<sub>10</sub>2</div></dd>
<dt class="decl">real <a class="symbol _variable" name="LOG10E" href="./htmlsrc/std.math.html#L188" kind="variable" beg="188" end="188">LOG10E</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#LOG10E" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L188">#</a></dt>
<dd class="ddef">
<div class="summary">log<sub>10</sub>e</div></dd>
<dt class="decl">real <a class="symbol _variable" name="LN2" href="./htmlsrc/std.math.html#L189" kind="variable" beg="189" end="189">LN2</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#LN2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L189">#</a></dt>
<dd class="ddef">
<div class="summary">ln 2</div></dd>
<dt class="decl">real <a class="symbol _variable" name="LN10" href="./htmlsrc/std.math.html#L190" kind="variable" beg="190" end="190">LN10</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#LN10" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L190">#</a></dt>
<dd class="ddef">
<div class="summary">ln 10</div></dd>
<dt class="decl">real <a class="symbol _variable" name="PI" href="./htmlsrc/std.math.html#L191" kind="variable" beg="191" end="191">PI</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#PI" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L191">#</a></dt>
<dd class="ddef">
<div class="summary">&pi;</div></dd>
<dt class="decl">real <a class="symbol _variable" name="PI_2" href="./htmlsrc/std.math.html#L192" kind="variable" beg="192" end="192">PI_2</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#PI_2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L192">#</a></dt>
<dd class="ddef">
<div class="summary">&pi; / 2</div></dd>
<dt class="decl">real <a class="symbol _variable" name="PI_4" href="./htmlsrc/std.math.html#L193" kind="variable" beg="193" end="193">PI_4</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#PI_4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L193">#</a></dt>
<dd class="ddef">
<div class="summary">&pi; / 4</div></dd>
<dt class="decl">real <a class="symbol _variable" name="M_1_PI" href="./htmlsrc/std.math.html#L194" kind="variable" beg="194" end="194">M_1_PI</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#M_1_PI" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L194">#</a></dt>
<dd class="ddef">
<div class="summary">1 / &pi;</div></dd>
<dt class="decl">real <a class="symbol _variable" name="M_2_PI" href="./htmlsrc/std.math.html#L195" kind="variable" beg="195" end="195">M_2_PI</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#M_2_PI" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L195">#</a></dt>
<dd class="ddef">
<div class="summary">2 / &pi;</div></dd>
<dt class="decl">real <a class="symbol _variable" name="M_2_SQRTPI" href="./htmlsrc/std.math.html#L196" kind="variable" beg="196" end="196">M_2_SQRTPI</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#M_2_SQRTPI" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L196">#</a></dt>
<dd class="ddef">
<div class="summary">2 / &radic;&pi;</div></dd>
<dt class="decl">real <a class="symbol _variable" name="SQRT2" href="./htmlsrc/std.math.html#L197" kind="variable" beg="197" end="197">SQRT2</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#SQRT2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L197">#</a></dt>
<dd class="ddef">
<div class="summary">&radic;2</div></dd>
<dt class="decl">real <a class="symbol _variable" name="SQRT1_2" href="./htmlsrc/std.math.html#L198" kind="variable" beg="198" end="198">SQRT1_2</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#SQRT1_2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L198">#</a></dt>
<dd class="ddef">
<div class="summary">&radic;&frac12;</div></dd>
<dt class="decl">real <a class="symbol _function" name="abs" href="./htmlsrc/std.math.html#L221" kind="function" beg="221" end="224">abs</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#abs" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L221">#</a></dt>
<dt class="decl">long <a class="symbol _function" name="abs:2" href="./htmlsrc/std.math.html#L227" kind="function" beg="227" end="230">abs</a><span class="params">(long <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#abs:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L227">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="abs:3" href="./htmlsrc/std.math.html#L233" kind="function" beg="233" end="236">abs</a><span class="params">(int <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#abs:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L233">#</a></dt>
<dt class="decl">real <a class="symbol _function" name="abs:4" href="./htmlsrc/std.math.html#L239" kind="function" beg="239" end="242">abs</a><span class="params">(creal <em>z</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#abs:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L239">#</a></dt>
<dt class="decl">real <a class="symbol _function" name="abs:5" href="./htmlsrc/std.math.html#L245" kind="function" beg="245" end="248">abs</a><span class="params">(ireal <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#abs:5" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L245">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the absolute value</div>
For complex numbers, abs(z) = sqrt( z.re<sup>2</sup> + z.im<sup>2</sup> )
 = hypot(z.re, z.im).</dd>
<dt class="decl"><a class="symbol _unittest" name="unittest" href="./htmlsrc/std.math.html#L251" kind="unittest" beg="251" end="261">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L251">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">creal <a class="symbol _function" name="conj" href="./htmlsrc/std.math.html#L271" kind="function" beg="271" end="274">conj</a><span class="params">(creal <em>z</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#conj" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L271">#</a></dt>
<dt class="decl">ireal <a class="symbol _function" name="conj:2" href="./htmlsrc/std.math.html#L277" kind="function" beg="277" end="280">conj</a><span class="params">(ireal <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#conj:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L277">#</a></dt>
<dd class="ddef">
<div class="summary">Complex conjugate</div>
conj(x + iy) = x - iy
<p class="bl"/>
 Note that z * conj(z) = z.re<sup>2</sup> - z.im<sup>2</sup>
 is always a real number</dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:2" href="./htmlsrc/std.math.html#L282" kind="unittest" beg="282" end="287">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L282">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="cos" href="./htmlsrc/std.math.html#L301" kind="function" beg="301" end="301">cos</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#cos" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L301">#</a></dt>
<dd class="ddef">
<div class="summary">Returns cosine of x. x is in radians.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>cos(x)</th> <th>invalid?</th></tr>
      <tr><td><span class="red">NAN</span></td>            <td><span class="red">NAN</span></td> <td>yes</td>     </tr>
      <tr><td>&plusmn;&infin;</td> <td><span class="red">NAN</span></td> <td>yes</td>     </tr>
      </table>
<p class="sec_header"><span class="red">Bugs:</span></p>Results are undefined if |x| &gt;= 2<sup>64</sup>.</dd>
<dt class="decl">real <a class="symbol _function" name="sin" href="./htmlsrc/std.math.html#L316" kind="function" beg="316" end="316">sin</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sin" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L316">#</a></dt>
<dd class="ddef">
<div class="summary">Returns sine of x. x is in radians.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>               <th>sin(x)</th>      <th>invalid?</th></tr>
      <tr><td><span class="red">NAN</span></td>          <td><span class="red">NAN</span></td>      <td>yes</td></tr>
      <tr><td>&plusmn;0.0</td>    <td>&plusmn;0.0</td> <td>no</td></tr>
      <tr><td>&plusmn;&infin;</td>    <td><span class="red">NAN</span></td>      <td>yes</td></tr>
      </table>
<p class="sec_header"><span class="red">Bugs:</span></p>Results are undefined if |x| &gt;= 2<sup>64</sup>.</dd>
<dt class="decl">creal <a class="symbol _function" name="sin:2" href="./htmlsrc/std.math.html#L327" kind="function" beg="327" end="331">sin</a><span class="params">(creal <em>z</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sin:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L327">#</a></dt>
<dt class="decl">ireal <a class="symbol _function" name="sin:3" href="./htmlsrc/std.math.html#L334" kind="function" beg="334" end="337">sin</a><span class="params">(ireal <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sin:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L334">#</a></dt>
<dd class="ddef">
<div class="summary">sine, complex and imaginary</div>
sin(z) = sin(z.re)*cosh(z.im) + cos(z.re)*sinh(z.im)i
<p class="bl"/>
 If both sin(&theta;) and cos(&theta;) are required,
 it is most efficient to use expi(&theta).</dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:3" href="./htmlsrc/std.math.html#L339" kind="unittest" beg="339" end="342">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L339">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">creal <a class="symbol _function" name="cos:2" href="./htmlsrc/std.math.html#L349" kind="function" beg="349" end="353">cos</a><span class="params">(creal <em>z</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#cos:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L349">#</a></dt>
<dt class="decl">real <a class="symbol _function" name="cos:3" href="./htmlsrc/std.math.html#L356" kind="function" beg="356" end="359">cos</a><span class="params">(ireal <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#cos:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L356">#</a></dt>
<dd class="ddef">
<div class="summary">cosine, complex and imaginary</div>
cos(z) = cos(z.re)*cosh(z.im) - sin(z.re)*sinh(z.im)i</dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:4" href="./htmlsrc/std.math.html#L361" kind="unittest" beg="361" end="365">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L361">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="tan" href="./htmlsrc/std.math.html#L378" kind="function" beg="378" end="412">tan</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#tan" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L378">#</a></dt>
<dd class="ddef">
<div class="summary">Returns tangent of x. x is in radians.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>             <th>tan(x)</th>       <th>invalid?</th></tr>
      <tr><td><span class="red">NAN</span></td>        <td><span class="red">NAN</span></td>       <td>yes</td></tr>
      <tr><td>&plusmn;0.0</td>  <td>&plusmn;0.0</td> <td>no</td></tr>
      <tr><td>&plusmn;&infin;</td>  <td><span class="red">NAN</span></td>       <td>yes</td></tr>
      </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:5" href="./htmlsrc/std.math.html#L414" kind="unittest" beg="414" end="466">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:5" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L414">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="acos" href="./htmlsrc/std.math.html#L479" kind="function" beg="479" end="479">acos</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#acos" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L479">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the arc cosine of x,
 returning a value ranging from -&pi;/2 to &pi;/2.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>         <th>acos(x)</th> <th>invalid?</th></tr>
      <tr><td>&gt;1.0</td>  <td><span class="red">NAN</span></td>  <td>yes</td></tr>
      <tr><td>&lt;-1.0</td> <td><span class="red">NAN</span></td>  <td>yes</td></tr>
      <tr><td><span class="red">NAN</span></td>    <td><span class="red">NAN</span></td>  <td>yes</td></tr>
  </table></dd>
<dt class="decl">real <a class="symbol _function" name="asin" href="./htmlsrc/std.math.html#L492" kind="function" beg="492" end="492">asin</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#asin" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L492">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the arc sine of x,
 returning a value ranging from -&pi;/2 to &pi;/2.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>            <th>asin(x)</th>      <th>invalid?</th></tr>
      <tr><td>&plusmn;0.0</td> <td>&plusmn;0.0</td> <td>no</td></tr>
      <tr><td>&gt;1.0</td>     <td><span class="red">NAN</span></td>       <td>yes</td></tr>
      <tr><td>&lt;-1.0</td>    <td><span class="red">NAN</span></td>       <td>yes</td></tr>
  </table></dd>
<dt class="decl">real <a class="symbol _function" name="atan" href="./htmlsrc/std.math.html#L504" kind="function" beg="504" end="504">atan</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#atan" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L504">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the arc tangent of x,
 returning a value ranging from -&pi;/2 to &pi;/2.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>atan(x)</th>      <th>invalid?</th></tr>
  <tr><td>&plusmn;0.0</td>      <td>&plusmn;0.0</td> <td>no</td></tr>
      <tr><td>&plusmn;&infin;</td> <td><span class="red">NAN</span></td>       <td>yes</td></tr>
  </table></dd>
<dt class="decl">real <a class="symbol _function" name="atan2" href="./htmlsrc/std.math.html#L527" kind="function" beg="527" end="527">atan2</a><span class="params">(real <em>y</em>, real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#atan2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L527">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the arc tangent of y / x,
 returning a value ranging from -&pi; to &pi;.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>y</th>                 <th>x</th>            <th>atan(y, x)</th></tr>
      <tr><td><span class="red">NAN</span></td>            <td>anything</td>     <td><span class="red">NAN</span></td> </tr>
      <tr><td>anything</td>          <td><span class="red">NAN</span></td>       <td><span class="red">NAN</span></td> </tr>
      <tr><td>&plusmn;0.0</td>      <td>&gt;0.0</td>     <td>&plusmn;0.0</td> </tr>
      <tr><td>&plusmn;0.0</td>      <td>+0.0</td>         <td>&plusmn;0.0</td> </tr>
      <tr><td>&plusmn;0.0</td>      <td>&lt;0.0</td>     <td>&plusmn;&pi;</td></tr>
      <tr><td>&plusmn;0.0</td>      <td>-0.0</td>         <td>&plusmn;&pi;</td></tr>
      <tr><td>&gt;0.0</td>          <td>&plusmn;0.0</td> <td>&pi;/2</td> </tr>
      <tr><td>&lt;0.0</td>          <td>&plusmn;0.0</td> <td>-&pi;/2</td> </tr>
      <tr><td>&gt;0.0</td>          <td>&infin;</td>     <td>&plusmn;0.0</td> </tr>
      <tr><td>&plusmn;&infin;</td> <td>anything</td>     <td>&plusmn;&pi;/2</td></tr>
      <tr><td>&gt;0.0</td>          <td>-&infin;</td>    <td>&plusmn;&pi;</td> </tr>
      <tr><td>&plusmn;&infin;</td> <td>&infin;</td>     <td>&plusmn;&pi;/4</td></tr>
      <tr><td>&plusmn;&infin;</td> <td>-&infin;</td>    <td>&plusmn;3&pi;/4</td></tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="cosh" href="./htmlsrc/std.math.html#L537" kind="function" beg="537" end="537">cosh</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#cosh" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L537">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the hyperbolic cosine of x.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>cosh(x)</th>      <th>invalid?</th></tr>
      <tr><td>&plusmn;&infin;</td> <td>&plusmn;0.0</td> <td>no</td> </tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="sinh" href="./htmlsrc/std.math.html#L548" kind="function" beg="548" end="548">sinh</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sinh" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L548">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the hyperbolic sine of x.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>sinh(x)</th>           <th>invalid?</th></tr>
      <tr><td>&plusmn;0.0</td>      <td>&plusmn;0.0</td>      <td>no</td></tr>
      <tr><td>&plusmn;&infin;</td> <td>&plusmn;&infin;</td> <td>no</td></tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="tanh" href="./htmlsrc/std.math.html#L559" kind="function" beg="559" end="559">tanh</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#tanh" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L559">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the hyperbolic tangent of x.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>tanh(x)</th>      <th>invalid?</th></tr>
      <tr><td>&plusmn;0.0</td>      <td>&plusmn;0.0</td> <td>no</td> </tr>
      <tr><td>&plusmn;&infin;</td> <td>&plusmn;1.0</td> <td>no</td></tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="acosh" href="./htmlsrc/std.math.html#L581" kind="function" beg="581" end="587">acosh</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#acosh" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L581">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the inverse hyperbolic cosine of x.</div>
Mathematically, acosh(x) = log(x + sqrt( x*x - 1))
<p class="bl"/>
 <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
  <!-- undefined macro in std/math.d -->
  <!-- undefined macro in std/math.d --> </table>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
    <tr><th>x</th> <th>acosh(x) </th></tr>
    <tr><td><span class="red">NAN</span></td> <td><span class="red">NAN</span> </td></tr>
    <tr><td><1</td> <td><span class="red">NAN</span> </td></tr>
    <tr><td>1</td> <td>0       </td></tr>
    <tr><td>+&infin;</td> <td>+&infin;</td></tr>
  </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:6" href="./htmlsrc/std.math.html#L589" kind="unittest" beg="589" end="595">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:6" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L589">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="asinh" href="./htmlsrc/std.math.html#L613" kind="function" beg="613" end="621">asinh</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#asinh" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L613">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the inverse hyperbolic sine of x.</div>
Mathematically,
  <pre class="d_code">
<span class="i">asinh</span>(<span class="i">x</span>) =  <span class="i">log</span>( <span class="i">x</span> + <span class="i">sqrt</span>( <span class="i">x</span>*<span class="i">x</span> + <span class="n">1</span> )) <span class="lc">// if x &gt;= +0</span>
<span class="i">asinh</span>(<span class="i">x</span>) = -<span class="i">log</span>(-<span class="i">x</span> + <span class="i">sqrt</span>( <span class="i">x</span>*<span class="i">x</span> + <span class="n">1</span> )) <span class="lc">// if x &lt;= -0</span>
</pre>
<p class="bl"/>
    <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
    <tr><th>x</th> <th>asinh(x)       </th></tr>
    <tr><td><span class="red">NAN</span></td> <td><span class="red">NAN</span>         </td></tr>
    <tr><td>&plusmn;0</td> <td>&plusmn;0      </td></tr>
    <tr><td>&plusmn;&infin;</td> <td>&plusmn;&infin;</td></tr>
    </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:7" href="./htmlsrc/std.math.html#L623" kind="unittest" beg="623" end="630">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:7" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L623">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="atanh" href="./htmlsrc/std.math.html#L649" kind="function" beg="649" end="653">atanh</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#atanh" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L649">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the inverse hyperbolic tangent of x,
 returning a value from ranging from -1 to 1.</div>
Mathematically, atanh(x) = log( (1+x)/(1-x) ) / 2
<p class="bl"/>

 <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
  <!-- undefined macro in std/math.d -->
  <!-- undefined macro in std/math.d --> </table>
 <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
    <tr><th>x</th> <th>acosh(x) </th></tr>
    <tr><td><span class="red">NAN</span></td> <td><span class="red">NAN</span> </td></tr>
    <tr><td>&plusmn;0</td> <td>&plusmn;0</td></tr>
    <tr><td>-&infin;</td> <td>-0</td></tr>
 </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:8" href="./htmlsrc/std.math.html#L655" kind="unittest" beg="655" end="661">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:8" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L655">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">long <a class="symbol _function" name="rndtol" href="./htmlsrc/std.math.html#L669" kind="function" beg="669" end="669">rndtol</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#rndtol" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L669">#</a></dt>
<dd class="ddef">
<div class="summary">Returns x rounded to a long value using the current rounding mode.
 If the integer value of x is
 greater than long.max, the result is
 indeterminate.</div></dd>
<dt class="decl">real <a class="symbol _function" name="rndtonl" href="./htmlsrc/std.math.html#L678" kind="function" beg="678" end="678">rndtonl</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>, <span class="linkg">extern(C)</span>]</span> <a title="Permalink to this symbol" href="#rndtonl" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L678">#</a></dt>
<dd class="ddef">
<div class="summary">Returns x rounded to a long value using the FE_TONEAREST rounding mode.
 If the integer value of x is
 greater than long.max, the result is
 indeterminate.</div></dd>
<dt class="decl">float <a class="symbol _function" name="sqrt" href="./htmlsrc/std.math.html#L691" kind="function" beg="691" end="691">sqrt</a><span class="params">(float <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sqrt" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L691">#</a></dt>
<dt class="decl">real <a class="symbol _function" name="sqrt:3" href="./htmlsrc/std.math.html#L693" kind="function" beg="693" end="693">sqrt</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sqrt:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L693">#</a></dt>
<dt class="decl">creal <a class="symbol _function" name="sqrt:4" href="./htmlsrc/std.math.html#L695" kind="function" beg="695" end="734">sqrt</a><span class="params">(creal <em>z</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sqrt:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L695">#</a></dt>
<dd class="ddef">
<div class="summary">Compute square root of x.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>         <th>sqrt(x)</th>   <th>invalid?</th></tr>
      <tr><td>-0.0</td>      <td>-0.0</td>      <td>no</td></tr>
      <tr><td>&lt;0.0</td>  <td><span class="red">NAN</span></td>    <td>yes</td></tr>
      <tr><td>+&infin;</td> <td>+&infin;</td> <td>no</td></tr>
      </table></dd>
<dt class="decl">double <a class="symbol _function" name="sqrt:2" href="./htmlsrc/std.math.html#L692" kind="function" beg="692" end="692">sqrt</a><span class="params">(double <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#sqrt:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L692">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="exp" href="./htmlsrc/std.math.html#L745" kind="function" beg="745" end="745">exp</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#exp" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L745">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates e<span style="vertical-align:super;font-size:smaller">x</span>.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>         <th>exp(x)</th></tr>
      <tr><td>+&infin;</td> <td>+&infin;</td> </tr>
      <tr><td>-&infin;</td> <td>+0.0</td> </tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="exp2" href="./htmlsrc/std.math.html#L756" kind="function" beg="756" end="756">exp2</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#exp2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L756">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates 2<span style="vertical-align:super;font-size:smaller">x</span>.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>         <th>exp2(x)</th></tr>
      <tr><td>+&infin;</td> <td>+&infin;</td></tr>
      <tr><td>-&infin;</td> <td>+0.0</td></tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="expm1" href="./htmlsrc/std.math.html#L773" kind="function" beg="773" end="773">expm1</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#expm1" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L773">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the value of the natural logarithm base (e)
 raised to the power of x, minus 1.</div>
For very small x, expm1(x) is more accurate
 than exp(x)-1.
<p class="bl"/>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>            <th>e<span style="vertical-align:super;font-size:smaller">x</span>-1</th></tr>
      <tr><td>&plusmn;0.0</td> <td>&plusmn;0.0</td></tr>
      <tr><td>+&infin;</td>    <td>+&infin;</td></tr>
      <tr><td>-&infin;</td>    <td>-1.0</td></tr>
      </table></dd>
<dt class="decl">creal <a class="symbol _function" name="expi" href="./htmlsrc/std.math.html#L782" kind="function" beg="782" end="797">expi</a><span class="params">(real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#expi" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L782">#</a></dt>
<dd class="ddef">
<div class="summary">Calculate cos(y) + i sin(y).</div>
On many CPUs (such as x86), this is a very efficient operation;
 almost twice as fast as calculating sin(y) and cos(y) separately,
 and is the preferred method when both are required.</dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:9" href="./htmlsrc/std.math.html#L799" kind="unittest" beg="799" end="803">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:9" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L799">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="frexp" href="./htmlsrc/std.math.html#L823" kind="function" beg="823" end="927">frexp</a><span class="params">(real <em>value</em>, out int <em>exp</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#frexp" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L823">#</a></dt>
<dd class="ddef">
<div class="summary">Separate floating point value into significand and exponent.</div>
<p class="sec_header">Returns:</p>Calculate and return <i>x</i> and exp such that
      value =<i>x</i>*2<span style="vertical-align:super;font-size:smaller">exp</span> and
      .5 &lt;= |<i>x</i>| &lt; 1.0<br>
      <i>x</i> has same sign as value.
<p class="bl"/>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>value</th>           <th>returns</th>         <th>exp</th></tr>
      <tr><td>&plusmn;0.0</td>    <td>&plusmn;0.0</td>    <td>0</td></tr>
      <tr><td>+&infin;</td>       <td>+&infin;</td>       <td>int.max</td></tr>
      <tr><td>-&infin;</td>       <td>-&infin;</td>       <td>int.min</td></tr>
      <tr><td>&plusmn;<span class="red">NAN</span></td> <td>&plusmn;<span class="red">NAN</span></td> <td>int.min</td></tr>
      </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:10" href="./htmlsrc/std.math.html#L930" kind="unittest" beg="930" end="979">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:10" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L930">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="ilogb" href="./htmlsrc/std.math.html#L994" kind="function" beg="994" end="994">ilogb</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#ilogb" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L994">#</a></dt>
<dd class="ddef">
<div class="summary">Extracts the exponent of x as a signed integral value.</div>
If x is not a special value, the result is the same as
 <tt>cast(int)logb(x)</tt>.
<p class="bl"/>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                <th>ilogb(x)</th>     <th>Range error?</th></tr>
      <tr><td>0</td>                 <td>FP_ILOGB0</td>   <td>yes</td></tr>
      <tr><td>&plusmn;&infin;</td> <td>int.max</td>     <td>no</td></tr>
      <tr><td><span class="red">NAN</span></td>            <td>FP_ILOGBNAN</td> <td>no</td></tr>
      </table></dd>
<dt class="decl">alias std.c.math.FP_ILOGB0 <a class="symbol _alias" name="FP_ILOGB0" href="./htmlsrc/std.math.html#L996" kind="alias" beg="996" end="996">FP_ILOGB0</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#FP_ILOGB0" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L996">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">alias std.c.math.FP_ILOGBNAN <a class="symbol _alias" name="FP_ILOGBNAN" href="./htmlsrc/std.math.html#L997" kind="alias" beg="997" end="997">FP_ILOGBNAN</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#FP_ILOGBNAN" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L997">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="ldexp" href="./htmlsrc/std.math.html#L1005" kind="function" beg="1005" end="1005">ldexp</a><span class="params">(real <em>n</em>, int <em>exp</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#ldexp" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1005">#</a></dt>
<dd class="ddef">
<div class="summary">Compute n * 2<span style="vertical-align:super;font-size:smaller">exp</span></div>
<p class="sec_header">References:</p>frexp</dd>
<dt class="decl">real <a class="symbol _function" name="log" href="./htmlsrc/std.math.html#L1018" kind="function" beg="1018" end="1018">log</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#log" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1018">#</a></dt>
<dd class="ddef">
<div class="summary">Calculate the natural logarithm of x.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
    <tr><th>x</th>            <th>log(x)</th>    <th>divide by 0?</th> <th>invalid?</th></tr>
    <tr><td>&plusmn;0.0</td> <td>-&infin;</td> <td>yes</td>          <td>no</td></tr>
    <tr><td>&lt;0.0</td>     <td><span class="red">NAN</span></td>    <td>no</td>           <td>yes</td></tr>
    <tr><td>+&infin;</td>    <td>+&infin;</td> <td>no</td>           <td>no</td></tr>
    </table></dd>
<dt class="decl">real <a class="symbol _function" name="log10" href="./htmlsrc/std.math.html#L1031" kind="function" beg="1031" end="1031">log10</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#log10" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1031">#</a></dt>
<dd class="ddef">
<div class="summary">Calculate the base-10 logarithm of x.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>            <th>log10(x)</th>  <th>divide by 0?</th> <th>invalid?</th></tr>
      <tr><td>&plusmn;0.0</td> <td>-&infin;</td> <td>yes</td>          <td>no</td></tr>
      <tr><td>&lt;0.0</td>     <td><span class="red">NAN</span></td>    <td>no</td>           <td>yes</td></tr>
      <tr><td>+&infin;</td>    <td>+&infin;</td> <td>no</td>           <td>no</td></tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="log1p" href="./htmlsrc/std.math.html#L1048" kind="function" beg="1048" end="1048">log1p</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#log1p" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1048">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the natural logarithm of 1 + x.</div>
For very small x, log1p(x) will be more accurate than
      log(1 + x).
<p class="bl"/>
  <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
  <tr><th>x</th>            <th>log1p(x)</th>     <th>divide by 0?</th> <th>invalid?</th></tr>
  <tr><td>&plusmn;0.0</td> <td>&plusmn;0.0</td> <td>no</td>           <td>no</td></tr>
  <tr><td>-1.0</td>         <td>-&infin;</td>    <td>yes</td>          <td>no</td></tr>
  <tr><td>&lt;-1.0</td>    <td><span class="red">NAN</span></td>       <td>no</td>           <td>yes</td></tr>
  <tr><td>+&infin;</td>    <td>-&infin;</td>    <td>no</td>           <td>no</td></tr>
  </table></dd>
<dt class="decl">real <a class="symbol _function" name="log2" href="./htmlsrc/std.math.html#L1061" kind="function" beg="1061" end="1061">log2</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#log2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1061">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the base-2 logarithm of x:
 log<sub>2</sub>x</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
  <tr><th>x</th>            <th>log2(x)</th>   <th>divide by 0?</th> <th>invalid?</th></tr>
  <tr><td>&plusmn;0.0</td> <td>-&infin;</td> <td>yes</td>          <td>no</td> </tr>
  <tr><td>&lt;0.0</td>     <td><span class="red">NAN</span></td>    <td>no</td>           <td>yes</td> </tr>
  <tr><td>+&infin;</td>    <td>+&infin;</td> <td>no</td>           <td>no</td> </tr>
  </table></dd>
<dt class="decl">real <a class="symbol _function" name="logb" href="./htmlsrc/std.math.html#L1077" kind="function" beg="1077" end="1077">logb</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#logb" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1077">#</a></dt>
<dd class="ddef">
<div class="summary">Extracts the exponent of x as a signed integral value.</div>
If x is subnormal, it is treated as if it were normalized.
 For a positive, finite x:
<p class="bl"/>
 1 &lt;= <i>x</i> * FLT_RADIX<span style="vertical-align:super;font-size:smaller">-logb(x)</span> &lt; FLT_RADIX
<p class="bl"/>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>logb(x)</th>   <th>divide by 0?</th> </tr>
      <tr><td>&plusmn;&infin;</td> <td>+&infin;</td> <td>no</td></tr>
      <tr><td>&plusmn;0.0</td>      <td>-&infin;</td> <td>yes</td> </tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="modf" href="./htmlsrc/std.math.html#L1093" kind="function" beg="1093" end="1093">modf</a><span class="params">(real <em>x</em>, inout real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#modf" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1093">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the remainder from the calculation x/y.</div>
<p class="sec_header">Returns:</p>The value of x - i * y, where i is the number of times that y can
 be completely subtracted from x. The result has the same sign as x.
<p class="bl"/>
 <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
  <tr><th>x</th>              <th>y</th>             <th>modf(x, y)</th>   <th>invalid?</th></tr>
  <tr><td>&plusmn;0.0</td>   <td>not 0.0</td>       <td>&plusmn;0.0</td> <td>no</td></tr>
  <tr><td>&plusmn;&infin;</td>   <td>anything</td>      <td><span class="red">NAN</span></td>       <td>yes</td></tr>
  <tr><td>anything</td>       <td>&plusmn;0.0</td>  <td><span class="red">NAN</span></td>       <td>yes</td></tr>
  <tr><td>!=&plusmn;&infin;</td> <td>&plusmn;&infin;</td>  <td>x</td>            <td>no</td></tr>
 </table></dd>
<dt class="decl">real <a class="symbol _function" name="scalbn" href="./htmlsrc/std.math.html#L1107" kind="function" beg="1107" end="1120">scalbn</a><span class="params">(real <em>x</em>, int <em>n</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#scalbn" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1107">#</a></dt>
<dd class="ddef">
<div class="summary">Efficiently calculates x * 2<span style="vertical-align:super;font-size:smaller">n</span>.</div>
scalbn handles underflow and overflow in
 the same fashion as the basic arithmetic operators.
<p class="bl"/>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>scalb(x)</th></tr>
      <tr><td>&plusmn;&infin;</td>      <td>&plusmn;&infin;</td> </tr>
      <tr><td>&plusmn;0.0</td>      <td>&plusmn;0.0</td> </tr>
      </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:11" href="./htmlsrc/std.math.html#L1122" kind="unittest" beg="1122" end="1124">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:11" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1122">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="cbrt" href="./htmlsrc/std.math.html#L1136" kind="function" beg="1136" end="1136">cbrt</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#cbrt" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1136">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the cube root of x.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th><i>x</i></th>            <th>cbrt(x)</th>           <th>invalid?</th></tr>
      <tr><td>&plusmn;0.0</td>      <td>&plusmn;0.0</td>      <td>no</td> </tr>
      <tr><td><span class="red">NAN</span></td>            <td><span class="red">NAN</span></td>            <td>yes</td> </tr>
      <tr><td>&plusmn;&infin;</td> <td>&plusmn;&infin;</td> <td>no</td> </tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="fabs" href="./htmlsrc/std.math.html#L1148" kind="function" beg="1148" end="1148">fabs</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#fabs" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1148">#</a></dt>
<dd class="ddef">
<div class="summary">Returns |x|</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>fabs(x)</th></tr>
      <tr><td>&plusmn;0.0</td>      <td>+0.0</td> </tr>
      <tr><td>&plusmn;&infin;</td> <td>+&infin;</td> </tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="hypot" href="./htmlsrc/std.math.html#L1170" kind="function" beg="1170" end="1240">hypot</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#hypot" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1170">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the length of the
 hypotenuse of a right-angled triangle with sides of length x and y.
 The hypotenuse is the value of the square root of
 the sums of the squares of x and y:</div>
sqrt(x<sup>2</sup> + y<sup>2</sup>)
<p class="bl"/>
 Note that hypot(x, y), hypot(y, x) and
 hypot(x, -y) are equivalent.
<p class="bl"/>
  <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
  <tr><th>x</th>            <th>y</th>            <th>hypot(x, y)</th> <th>invalid?</th></tr>
  <tr><td>x</td>            <td>&plusmn;0.0</td> <td>|x|</td>         <td>no</td></tr>
  <tr><td>&plusmn;&infin;</td> <td>y</td>            <td>+&infin;</td>   <td>no</td></tr>
  <tr><td>&plusmn;&infin;</td> <td><span class="red">NAN</span></td>       <td>+&infin;</td>   <td>no</td></tr>
  </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:12" href="./htmlsrc/std.math.html#L1242" kind="unittest" beg="1242" end="1265">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:12" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1242">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="erf" href="./htmlsrc/std.math.html#L1272" kind="function" beg="1272" end="1272">erf</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#erf" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1272">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the error function of x.</div>
<img src="erf.gif" alt="error function"></dd>
<dt class="decl">real <a class="symbol _function" name="erfc" href="./htmlsrc/std.math.html#L1279" kind="function" beg="1279" end="1279">erfc</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#erfc" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1279">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the complementary error function of x, which is 1 - erf(x).</div>
<img src="erfc.gif" alt="complementary error function"></dd>
<dt class="decl">real <a class="symbol _function" name="lgamma" href="./htmlsrc/std.math.html#L1297" kind="function" beg="1297" end="1302">lgamma</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#lgamma" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1297">#</a></dt>
<dd class="ddef">
<div class="summary">Natural logarithm of gamma function.</div>
Returns the base e (2.718...) logarithm of the absolute
 value of the gamma function of the argument.
<p class="bl"/>
 For reals, lgamma is equivalent to log(fabs(gamma(x))).
<p class="bl"/>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>                 <th>lgamma(x)</th> <th>invalid?</th></tr>
      <tr><td><span class="red">NAN</span></td>            <td><span class="red">NAN</span></td>    <td>yes</td></tr>
      <tr><td>integer <= 0</td>      <td>+&infin;</td> <td>yes</td></tr>
      <tr><td>&plusmn;&infin;</td> <td>+&infin;</td> <td>no</td></tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="tgamma" href="./htmlsrc/std.math.html#L1328" kind="function" beg="1328" end="1333">tgamma</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#tgamma" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1328">#</a></dt>
<dd class="ddef">
<div class="summary">The Gamma function, &#915;(x)</div>
&#915;(x) is a generalisation of the factorial function
  to real and complex numbers.
  Like x!, &#915;(x+1) = x*&#915;(x).
<p class="bl"/>
  Mathematically, if z.re &gt; 0 then
   &#915;(z) = <big>&#8747;<sub><small>0</small></sub><sup>&infin;</sup></big> t<sup>z-1</sup>e<sup>-t</sup> dt
<p class="bl"/>
    <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>              <th>&#915;(x)</th>       <th>invalid?</th></tr>
      <tr><td><span class="red">NAN</span></td>         <td><span class="red">NAN</span></td>            <td>yes</td></tr>
      <tr><td>&plusmn;0.0</td>   <td>&plusmn;&infin;</td>      <td>yes</td></tr>
      <tr><td>integer &gt;0</td> <td>(x-1)!</td>            <td>no</td></tr>
      <tr><td>integer &lt;0</td> <td><span class="red">NAN</span></td>            <td>yes</td></tr>
      <tr><td>+&infin;</td>      <td>+&infin;</td>         <td>no</td></tr>
      <tr><td>-&infin;</td>      <td><span class="red">NAN</span></td>            <td>yes</td></tr>
    </table>
<p class="sec_header">References:</p><a href="http://en.wikipedia.org/wiki/Gamma_function">http://en.wikipedia.org/wiki/Gamma_function</a>,
      <a href="http://www.netlib.org/cephes/ldoubdoc.html#gamma">http://www.netlib.org/cephes/ldoubdoc.html#gamma</a></dd>
<dt class="decl">real <a class="symbol _function" name="ceil" href="./htmlsrc/std.math.html#L1339" kind="function" beg="1339" end="1339">ceil</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#ceil" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1339">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the value of x rounded upward to the next integer
 (toward positive infinity).</div></dd>
<dt class="decl">real <a class="symbol _function" name="floor" href="./htmlsrc/std.math.html#L1345" kind="function" beg="1345" end="1345">floor</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#floor" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1345">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the value of x rounded downward to the next integer
 (toward negative infinity).</div></dd>
<dt class="decl">real <a class="symbol _function" name="nearbyint" href="./htmlsrc/std.math.html#L1354" kind="function" beg="1354" end="1354">nearbyint</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nearbyint" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1354">#</a></dt>
<dd class="ddef">
<div class="summary">Rounds x to the nearest integer value, using the current rounding
 mode.</div>
Unlike the rint functions, nearbyint does not raise the
 FE_INEXACT exception.</dd>
<dt class="decl">real <a class="symbol _function" name="rint" href="./htmlsrc/std.math.html#L1364" kind="function" beg="1364" end="1364">rint</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#rint" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1364">#</a></dt>
<dd class="ddef">
<div class="summary">Rounds x to the nearest integer value, using the current rounding
 mode.
 If the return value is not equal to x, the FE_INEXACT
 exception is raised.
 <b>nearbyint</b> performs
 the same operation, but does not set the FE_INEXACT exception.</div></dd>
<dt class="decl">long <a class="symbol _function" name="lrint" href="./htmlsrc/std.math.html#L1376" kind="function" beg="1376" end="1392">lrint</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#lrint" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1376">#</a></dt>
<dd class="ddef">
<div class="summary">Rounds x to the nearest integer value, using the current rounding
 mode.</div>
This is generally the fastest method to convert a floating-point number
 to an integer. Note that the results from this function
 depend on the rounding mode, if the fractional part of x is exactly 0.5.
 If using the default rounding mode (ties round to even integers)
 lrint(4.5) == 4, lrint(5.5)==6.</dd>
<dt class="decl">real <a class="symbol _function" name="round" href="./htmlsrc/std.math.html#L1399" kind="function" beg="1399" end="1399">round</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#round" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1399">#</a></dt>
<dd class="ddef">
<div class="summary">Return the value of x rounded to the nearest integer.
 If the fractional part of x is exactly 0.5, the return value is rounded to
 the even integer.</div></dd>
<dt class="decl">long <a class="symbol _function" name="lround" href="./htmlsrc/std.math.html#L1409" kind="function" beg="1409" end="1415">lround</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#lround" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1409">#</a></dt>
<dd class="ddef">
<div class="summary">Return the value of x rounded to the nearest integer.</div>
If the fractional part of x is exactly 0.5, the return value is rounded
 away from zero.
<p class="sec_header">Note:</p>Not supported on windows</dd>
<dt class="decl">real <a class="symbol _function" name="trunc" href="./htmlsrc/std.math.html#L1422" kind="function" beg="1422" end="1422">trunc</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#trunc" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1422">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the integer portion of x, dropping the fractional portion.</div>
This is also known as "chop" rounding.</dd>
<dt class="decl">real <a class="symbol _function" name="remainder" href="./htmlsrc/std.math.html#L1446" kind="function" beg="1446" end="1446">remainder</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#remainder" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1446">#</a></dt>
<dd class="ddef">
<div class="summary">Calculate the remainder x REM y, following IEC 60559.</div>
REM is the value of x - y * n, where n is the integer nearest the exact
 value of x / y.
 If |n - x / y| == 0.5, n is even.
 If the result is zero, it has the same sign as x.
 Otherwise, the sign of the result is the sign of x / y.
 Precision mode has no effect on the remainder functions.
<p class="bl"/>
 remquo returns n in the parameter n.
<p class="bl"/>
 <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
  <tr><th>x</th>               <th>y</th>            <th>remainder(x, y)</th> <th>n</th>   <th>invalid?</th></tr>
  <tr><td>&plusmn;0.0</td>    <td>not 0.0</td>      <td>&plusmn;0.0</td>    <td>0.0</td> <td>no</td></tr>
  <tr><td>&plusmn;&infin;</td>    <td>anything</td>     <td><span class="red">NAN</span></td>          <td>?</td>   <td>yes</td></tr>
  <tr><td>anything</td>        <td>&plusmn;0.0</td> <td><span class="red">NAN</span></td>          <td>?</td>   <td>yes</td></tr>
  <tr><td>!= &plusmn;&infin;</td> <td>&plusmn;&infin;</td> <td>x</td>               <td>?</td>   <td>no</td></tr>
 </table>
<p class="sec_header">Note:</p>remquo not supported on windows</dd>
<dt class="decl">real <a class="symbol _function" name="remquo" href="./htmlsrc/std.math.html#L1448" kind="function" beg="1448" end="1454">remquo</a><span class="params">(real <em>x</em>, real <em>y</em>, out int <em>n</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#remquo" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1448">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="isnan" href="./htmlsrc/std.math.html#L1460" kind="function" beg="1460" end="1482">isnan</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#isnan" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1460">#</a></dt>
<dd class="ddef">
<div class="summary">Returns !=0 if e is a NaN.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:13" href="./htmlsrc/std.math.html#L1484" kind="unittest" beg="1484" end="1492">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:13" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1484">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="isfinite" href="./htmlsrc/std.math.html#L1498" kind="function" beg="1498" end="1503">isfinite</a><span class="params">(real <em>e</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#isfinite" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1498">#</a></dt>
<dd class="ddef">
<div class="summary">Returns !=0 if e is finite (not infinite or <span class="red">NAN</span>).</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:14" href="./htmlsrc/std.math.html#L1505" kind="unittest" beg="1505" end="1510">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:14" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1505">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="isnormal" href="./htmlsrc/std.math.html#L1521" kind="function" beg="1521" end="1533">isnormal</a><span class="tparams">(X)</span><span class="params">(X <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#isnormal" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1521">#</a></dt>
<dd class="ddef">
<div class="summary">Returns !=0 if x is normalized (not zero, subnormal, infinite, or <span class="red">NAN</span>).</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:15" href="./htmlsrc/std.math.html#L1536" kind="unittest" beg="1536" end="1553">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:15" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1536">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="issubnormal" href="./htmlsrc/std.math.html#L1564" kind="function" beg="1564" end="1568">issubnormal</a><span class="params">(float <em>f</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#issubnormal" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1564">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="issubnormal:2" href="./htmlsrc/std.math.html#L1580" kind="function" beg="1580" end="1585">issubnormal</a><span class="params">(double <em>d</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#issubnormal:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1580">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="issubnormal:3" href="./htmlsrc/std.math.html#L1597" kind="function" beg="1597" end="1615">issubnormal</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#issubnormal:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1597">#</a></dt>
<dd class="ddef">
<div class="summary">Is number subnormal? (Also called "denormal".)
 Subnormals have a 0 exponent and a 0 most significant mantissa bit.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:16" href="./htmlsrc/std.math.html#L1570" kind="unittest" beg="1570" end="1576">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:16" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1570">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:17" href="./htmlsrc/std.math.html#L1587" kind="unittest" beg="1587" end="1593">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:17" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1587">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:18" href="./htmlsrc/std.math.html#L1617" kind="unittest" beg="1617" end="1623">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:18" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1617">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="isinf" href="./htmlsrc/std.math.html#L1629" kind="function" beg="1629" end="1648">isinf</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#isinf" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1629">#</a></dt>
<dd class="ddef">
<div class="summary">Return !=0 if e is &plusmn;&infin;.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:19" href="./htmlsrc/std.math.html#L1650" kind="unittest" beg="1650" end="1658">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:19" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1650">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">bool <a class="symbol _function" name="isIdentical" href="./htmlsrc/std.math.html#L1667" kind="function" beg="1667" end="1682">isIdentical</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#isIdentical" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1667">#</a></dt>
<dd class="ddef">
<div class="summary">Is the binary representation of x identical to y?</div>
Same as ==, except that positive and negative zero are not identical,
 and two <span class="red">NAN</span>s are identical if they have the same 'payload'.</dd>
<dt class="decl">int <a class="symbol _function" name="signbit" href="./htmlsrc/std.math.html#L1688" kind="function" beg="1688" end="1691">signbit</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#signbit" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1688">#</a></dt>
<dd class="ddef">
<div class="summary">Return 1 if sign bit of e is set, 0 if not.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:20" href="./htmlsrc/std.math.html#L1693" kind="unittest" beg="1693" end="1702">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:20" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1693">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="copysign" href="./htmlsrc/std.math.html#L1708" kind="function" beg="1708" end="1717">copysign</a><span class="params">(real <em>to</em>, real <em>from</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#copysign" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1708">#</a></dt>
<dd class="ddef">
<div class="summary">Return a value composed of to with from's sign bit.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:21" href="./htmlsrc/std.math.html#L1719" kind="unittest" beg="1719" end="1737">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:21" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1719">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="nan" href="./htmlsrc/std.math.html#L1746" kind="function" beg="1746" end="1746">nan</a><span class="params">(char[] <em>tagp</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nan" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1746">#</a></dt>
<dd class="ddef">
<div class="summary">Creates a quiet NAN with the information from tagp[] embedded in it.</div>
<p class="sec_header"><span class="red">Bugs:</span></p>DMD always returns real.nan, ignoring the payload.</dd>
<dt class="decl">real <a class="symbol _function" name="nextUp" href="./htmlsrc/std.math.html#L1766" kind="function" beg="1766" end="1836">nextUp</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextUp" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1766">#</a></dt>
<dt class="decl">double <a class="symbol _function" name="nextUp:2" href="./htmlsrc/std.math.html#L1839" kind="function" beg="1839" end="1858">nextUp</a><span class="params">(double <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextUp:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1839">#</a></dt>
<dt class="decl">float <a class="symbol _function" name="nextUp:3" href="./htmlsrc/std.math.html#L1861" kind="function" beg="1861" end="1880">nextUp</a><span class="params">(float <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextUp:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1861">#</a></dt>
<dd class="ddef">
<div class="summary">Calculate the next largest floating point value after x.</div>
Return the least number greater than x that is representable as a real;
 thus, it gives the next point on the IEEE number line.
<p class="bl"/>
  <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
    <tr><th>x</th> <th>nextUp(x)   </th></tr>
    <tr><td>-&infin;</td> <td>-real.max   </td></tr>
    <tr><td>&plusmn;0.0</td> <td>real.min*real.epsilon </td></tr>
    <tr><td>real.max</td> <td>&infin; </td></tr>
    <tr><td>&infin;</td> <td>&infin; </td></tr>
    <tr><td><span class="red">NAN</span></td> <td><span class="red">NAN</span>   </td></tr>
 </table>
<p class="sec_header">Remarks:</p>This function is included in the forthcoming IEEE 754R standard.</dd>
<dt class="decl">real <a class="symbol _function" name="nextDown" href="./htmlsrc/std.math.html#L1900" kind="function" beg="1900" end="1903">nextDown</a><span class="params">(real <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextDown" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1900">#</a></dt>
<dt class="decl">double <a class="symbol _function" name="nextDown:2" href="./htmlsrc/std.math.html#L1906" kind="function" beg="1906" end="1909">nextDown</a><span class="params">(double <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextDown:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1906">#</a></dt>
<dt class="decl">float <a class="symbol _function" name="nextDown:3" href="./htmlsrc/std.math.html#L1912" kind="function" beg="1912" end="1915">nextDown</a><span class="params">(float <em>x</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextDown:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1912">#</a></dt>
<dd class="ddef">
<div class="summary">Calculate the next smallest floating point value before x.</div>
Return the greatest number less than x that is representable as a real;
 thus, it gives the previous point on the IEEE number line.
<p class="bl"/>
  <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
    <tr><th>x</th> <th>nextDown(x)   </th></tr>
    <tr><td>&infin;</td> <td>real.max  </td></tr>
    <tr><td>&plusmn;0.0</td> <td>-real.min*real.epsilon </td></tr>
    <tr><td>-real.max</td> <td>-&infin; </td></tr>
    <tr><td>-&infin;</td> <td>-&infin; </td></tr>
    <tr><td><span class="red">NAN</span></td> <td><span class="red">NAN</span>    </td></tr>
 </table>
<p class="sec_header">Remarks:</p>This function is included in the forthcoming IEEE 754R standard.</dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:22" href="./htmlsrc/std.math.html#L1917" kind="unittest" beg="1917" end="1919">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:22" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1917">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="nextafter" href="./htmlsrc/std.math.html#L1939" kind="function" beg="1939" end="1947">nextafter</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextafter" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1939">#</a></dt>
<dt class="decl">float <a class="symbol _function" name="nextafter:2" href="./htmlsrc/std.math.html#L1950" kind="function" beg="1950" end="1958">nextafter</a><span class="params">(float <em>x</em>, float <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextafter:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1950">#</a></dt>
<dt class="decl">double <a class="symbol _function" name="nextafter:3" href="./htmlsrc/std.math.html#L1961" kind="function" beg="1961" end="1969">nextafter</a><span class="params">(double <em>x</em>, double <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#nextafter:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1961">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates the next representable value after x in the direction of y.</div>
If y &gt; x, the result will be the next largest floating-point value;
 if y &lt; x, the result will be the next smallest value.
 If x == y, the result is y.
<p class="sec_header">Remarks:</p>This function is not generally very useful; it's almost always better to use
 the faster functions nextUp() or nextDown() instead.
<p class="bl"/>
 IEEE 754 requirements not implemented on Windows:
 The FE_INEXACT and FE_OVERFLOW exceptions will be raised if x is finite and
 the function result is infinite. The FE_INEXACT and FE_UNDERFLOW
 exceptions will be raised if the function value is subnormal, and x is
 not equal to y.</dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:23" href="./htmlsrc/std.math.html#L1971" kind="unittest" beg="1971" end="1984">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:23" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1971">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="fdim" href="./htmlsrc/std.math.html#L1997" kind="function" beg="1997" end="1997">fdim</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#fdim" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L1997">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the positive difference between x and y.</div>
<p class="sec_header">Returns:</p><table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x, y</th>       <th>fdim(x, y)</th></tr>
      <tr><td>x &gt; y</td>  <td>x - y</td></tr>
      <tr><td>x &lt;= y</td> <td>+0.0</td></tr>
      </table></dd>
<dt class="decl">real <a class="symbol _function" name="fmax" href="./htmlsrc/std.math.html#L2002" kind="function" beg="2002" end="2002">fmax</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#fmax" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2002">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the larger of x and y.</div></dd>
<dt class="decl">real <a class="symbol _function" name="fmin" href="./htmlsrc/std.math.html#L2007" kind="function" beg="2007" end="2007">fmin</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#fmin" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2007">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the smaller of x and y.</div></dd>
<dt class="decl">real <a class="symbol _function" name="fma" href="./htmlsrc/std.math.html#L2015" kind="function" beg="2015" end="2015">fma</a><span class="params">(real <em>x</em>, real <em>y</em>, real <em>z</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#fma" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2015">#</a></dt>
<dd class="ddef">
<div class="summary">Returns (x * y) + z, rounding only once according to the
 current rounding mode.</div>
<p class="sec_header"><span class="red">Bugs:</span></p>Not currently implemented - rounds twice.</dd>
<dt class="decl">real <a class="symbol _function" name="pow" href="./htmlsrc/std.math.html#L2021" kind="function" beg="2021" end="2053">pow</a><span class="params">(real <em>x</em>, uint <em>n</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#pow" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2021">#</a></dt>
<dt class="decl">real <a class="symbol _function" name="pow:2" href="./htmlsrc/std.math.html#L2057" kind="function" beg="2057" end="2063">pow</a><span class="params">(real <em>x</em>, int <em>n</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#pow:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2057">#</a></dt>
<dd class="ddef">
<div class="summary">Fast integral powers.</div></dd>
<dt class="decl">real <a class="symbol _function" name="pow:3" href="./htmlsrc/std.math.html#L2108" kind="function" beg="2108" end="2201">pow</a><span class="params">(real <em>x</em>, real <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#pow:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2108">#</a></dt>
<dd class="ddef">
<div class="summary">Calculates x<span style="vertical-align:super;font-size:smaller">y</span>.</div>
<table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
 <tr><th>x</th> <th>y</th> <th>pow(x, y)</th>
      <th>div 0</th> <th>invalid?</th></tr>
 <tr><td>anything</td>      <td>&plusmn;0.0</td>                <td>1.0</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>|x| &gt; 1</td>    <td>+&infin;</td>                  <td>+&infin;</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>|x| &lt; 1</td>    <td>+&infin;</td>                  <td>+0.0</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>|x| &gt; 1</td>    <td>-&infin;</td>                  <td>+0.0</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>|x| &lt; 1</td>    <td>-&infin;</td>                  <td>+&infin;</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>+&infin;</td>      <td>&gt; 0.0</td>                  <td>+&infin;</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>+&infin;</td>      <td>&lt; 0.0</td>                  <td>+0.0</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>-&infin;</td>      <td>odd integer &gt; 0.0</td>      <td>-&infin;</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>-&infin;</td>      <td>&gt; 0.0, not odd integer</td> <td>+&infin;</td>
      <td>no</td>        <td>no</td></tr>
 <tr><td>-&infin;</td>      <td>odd integer &lt; 0.0</td>      <td>-0.0</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>-&infin;</td>      <td>&lt; 0.0, not odd integer</td> <td>+0.0</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>&plusmn;1.0</td>   <td>&plusmn;&infin;</td>          <td><span class="red">NAN</span></td>
      <td>no</td>        <td>yes</td> </tr>
 <tr><td>&lt; 0.0</td>      <td>finite, nonintegral</td>        <td><span class="red">NAN</span></td>
      <td>no</td>        <td>yes</td></tr>
 <tr><td>&plusmn;0.0</td>   <td>odd integer &lt; 0.0</td>      <td>&plusmn;&infin;</td>
      <td>yes</td>       <td>no</td> </tr>
 <tr><td>&plusmn;0.0</td>   <td>&lt; 0.0, not odd integer</td> <td>+&infin;</td>
      <td>yes</td>       <td>no</td></tr>
 <tr><td>&plusmn;0.0</td>   <td>odd integer &gt; 0.0</td>      <td>&plusmn;0.0</td>
      <td>no</td>        <td>no</td> </tr>
 <tr><td>&plusmn;0.0</td>   <td>&gt; 0.0, not odd integer</td> <td>+0.0</td>
      <td>no</td>        <td>no</td> </tr>
 </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:24" href="./htmlsrc/std.math.html#L2203" kind="unittest" beg="2203" end="2212">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:24" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2203">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="mfeq" href="./htmlsrc/std.math.html#L2222" kind="function" beg="2222" end="2231">mfeq</a><span class="params">(real <em>x</em>, real <em>y</em>, real <em>precision</em>)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#mfeq" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2222">#</a></dt>
<dd class="ddef">
<div class="summary">Simple function to compare two floating point values
 to a specified precision.</div>
<p class="sec_header">Returns:</p>1       match
      0       nomatch</dd>
<dt class="decl">int <a class="symbol _function" name="feqrel" href="./htmlsrc/std.math.html#L2248" kind="function" beg="2248" end="2319">feqrel</a><span class="tparams">(X)</span><span class="params">(X <em>x</em>, X <em>y</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#feqrel" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2248">#</a></dt>
<dd class="ddef">
<div class="summary">To what precision is x equal to y?</div>
<p class="sec_header">Returns:</p>the number of mantissa bits which are equal in x and y.
 eg, 0x1.F8p+60 and 0x1.F1p+60 are equal to 5 bits of precision.
<p class="bl"/>
      <table border=1 cellpadding=4 cellspacing=0>
              <caption>Special Values</caption>
              
      <tr><th>x</th>      <th>y</th>          <th>feqrel(x, y)</th></tr>
      <tr><td>x</td>      <td>x</td>          <td>real.mant_dig</td></tr>
      <tr><td>x</td>      <td>&gt;= 2*x</td> <td>0</td></tr>
      <tr><td>x</td>      <td>&lt;= x/2</td> <td>0</td></tr>
      <tr><td><span class="red">NAN</span></td> <td>any</td>        <td>0</td></tr>
      <tr><td>any</td>    <td><span class="red">NAN</span></td>     <td>0</td></tr>
      </table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:25" href="./htmlsrc/std.math.html#L2321" kind="unittest" beg="2321" end="2363">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:25" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2321">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">T <a class="symbol _function" name="ieeeMean" href="./htmlsrc/std.math.html#L2381" kind="function" beg="2381" end="2462">ieeeMean</a><span class="tparams">(T)</span><span class="params">(T <em>x</em>, T <em>y</em>)</span>; <span class="attrs">[<span class="prot">package</span>]</span> <a title="Permalink to this symbol" href="#ieeeMean" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2381">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:26" href="./htmlsrc/std.math.html#L2464" kind="unittest" beg="2464" end="2483">unittest</a>; <span class="attrs">[<span class="prot">package</span>]</span> <a title="Permalink to this symbol" href="#unittest:26" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2464">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">real <a class="symbol _function" name="poly" href="./htmlsrc/std.math.html#L2497" kind="function" beg="2497" end="2575">poly</a><span class="params">(real <em>x</em>, real[] <em>A</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#poly" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2497">#</a></dt>
<dd class="ddef">
<div class="summary">Evaluate polynomial A(x) = a<sub>0</sub> + a<sub>1</sub>x + a<sub>2</sub>&sup2;
                          + a<sub>3</sub>x&sup3; ...</div>
Uses Horner's rule A(x) = a<sub>0</sub> + x(a<sub>1</sub> + x(a<sub>2</sub>
                         + x(a<sub>3</sub> + ...)))
<p class="sec_header">Params:</p>
<table class="params">
<tr><td><em>A</em></td><td>array of coefficients a<sub>0</sub>, a<sub>1</sub>, etc.</td></tr></table></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:27" href="./htmlsrc/std.math.html#L2577" kind="unittest" beg="2577" end="2584">unittest</a>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#unittest:27" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.math.html#L2577">#</a></dt>
<dd class="ddef"></dd></dl>
</div>
<div id="footer">
  <p>Copyright © 1999-2008 by Digital Mars ®, All Rights Reserved.</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 03:40:08 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>